package com.example.swaggerDemo.Dao;

import com.example.swaggerDemo.entity.MsgEntity;
import com.example.swaggerDemo.entity.SysUserEntity;
import com.example.swaggerDemo.entity.usercount;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public interface SysUserDao {

    List<SysUserEntity> findByUpopenid(@RequestParam("upopenid") String upopenid, @RequestParam("level") String level,@RequestParam("username") String username) throws SQLException;


    List<SysUserEntity> findNoByUpopenid(@RequestParam("upopenid") String upopenid, @RequestParam("level") String level,@RequestParam("username") String username) throws SQLException;

    List<SysUserEntity> adminfinduser(@RequestParam("level") String level, @RequestParam("username") String username, @RequestParam("pageindex") int pagindex, @RequestParam("pagesize") int pagesize) throws SQLException;

    SysUserEntity findByid(@RequestParam("id") String id) throws SQLException;


    List<SysUserEntity> findall() throws SQLException;

    SysUserEntity findByOpenid(@RequestParam("openid") String openid) throws SQLException;

    int insert(@RequestParam("username") String username, @RequestParam("nickname") String nickname
            , @RequestParam("mobile") String mobile, @RequestParam("avatar") String avatar
            , @RequestParam("level") String level, @RequestParam("prevtime") Integer prevtime
            , @RequestParam("logintime") Integer logintime, @RequestParam("jointime") Integer jointime
            , @RequestParam("createtime") Integer createtime, @RequestParam("updatetime") Integer updatetime
            , @RequestParam("status") String status, @RequestParam("openid") String openid
            , @RequestParam("materielA") String materielA, @RequestParam("materielB") String materielB
            , @RequestParam("address") String address, @RequestParam("upopenid") String upopenid);

    int update(@RequestParam("username") String username, @RequestParam("mobile") String mobile, @RequestParam("address") String address,
               @RequestParam("id") String id);

    int updatesfz(@RequestParam("sfz") String sfz, @RequestParam("id") String id);



    //更新最近访问时间
    int updatehonmetime(@RequestParam("maxsuccessions") int maxsuccessions, @RequestParam("id") String id);

    int updateMateriel(@RequestParam("materielA") Integer materielA, @RequestParam("materielB") Integer materielB,
                       @RequestParam("id") String id);

    int updateUpopenid(@RequestParam("upopenid") String upopenid,
                       @RequestParam("id") Integer id);



    int updateTypedata(@RequestParam("typedata") String typedata,
                       @RequestParam("id") String id);

    int updatetoux(@RequestParam("avatar") String avatar,
                   @RequestParam("id") String id);

    List<usercount>  selectcount();

    int updateMoney(@RequestParam("money") double money,
                    @RequestParam("id") String id);
}
